<template>
  <view style="height: 100vh">
    <view class="main">
      <userList v-if="user.profile.roleType == '0'"></userList>
      <QuestionBank v-if="user.profile.roleType == 1"></QuestionBank>
    </view>
  </view>
</template>

<script setup>
import { useUserStore } from "@/store/user";
import { onMounted } from "vue";
import QuestionBank from "./components/QuestionBank.vue";
import userList from "./components/userList/index.vue";
const user = useUserStore();

onMounted(() => {
  if (user.profile.roleType == "0") {
    uni.setNavigationBarTitle({
      title: "用户",
    });
  } else {
    uni.setNavigationBarTitle({
      title: "题库",
    });
  }
});
</script>

<style lang="scss" scoped></style>
